Skip to content

Conversation

fmease
Copy link
Member

@fmease fmease commented Mar 10, 2024

I'm surprised my naive approach seems to work but it feels more than hacky (skipping name resolution entirely). I hope to gather some feedback for how to make this more robust and a bit cleaner and for how to resolve the various FIXME(fmease)s I added.

Not sure if I will continue this work by the way, it was a fun experiment on a Saturday evening. Of course, it would be awesome if this landed in some way or another :)

Fixes #98282.
Doesn't address #105398 yet.

r? diagnostics

@fmease fmease added A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. labels Mar 10, 2024
@fmease fmease force-pushed the recover-bad-struct-lit-w-tyck branch from 04a54a6 to be2e80e Compare March 10, 2024 11:58
@compiler-errors compiler-errors removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 12, 2024
@compiler-errors
Copy link
Member

If you want to chat about this approach, happy to, but I've removed the S-waiting-on-review since not sure if you want input or not.

@bors
Copy link
Collaborator

bors commented Apr 23, 2024

☔ The latest upstream changes (presumably #124277) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 23, 2024
@Dylan-DPC Dylan-DPC removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label May 1, 2024
if se.path == kw::Empty
&& self.r.dcx().has_stashed_diagnostic(expr.span, StashKey::StructLitNoType)
{
return;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're skipping name resolution entirely as mentioned in the PR description.
@petrochenkov, I'm sure this is super wrong. Please do enlighten me how I
could do better. No rush, though, this is a low priority experimental diagnostic PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do pings actually work inside draft PRs? 🤔

@fmease fmease added the S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. label Apr 15, 2025
@fmease fmease closed this Apr 15, 2025
@fmease
Copy link
Member Author

fmease commented Apr 15, 2025

Currently not interested in pursuing this further.

@fmease fmease deleted the recover-bad-struct-lit-w-tyck branch April 15, 2025 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints S-experimental Status: Ongoing experiment that does not require reviewing and won't be merged in its current state. S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggest the correct name if _ is used in a struct literal
4 participants